home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / mac / Technical Documentation / Develop / develop Issue 25 / develop Issue 25 code / FontToPict (Space Hack GX).sea / FontToPict (Space Hack GX) / FontToPict.c < prev    next >
MacBinary  |  1995-11-13  |  11.3 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Nov 13 14:20:14 1995, modified Mon Nov 13 14:20:14 1995, creator 'MPS ', type ASCII, 10812 bytes "FontToPict.c" , at 0x2abc 456 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 46 6f 6e 74 54 6f | 50 69 63 74 2e 63 00 00 |..FontTo|Pict.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 2a 3c 00 | 00 01 c8 ac cd 4a ee ac |.....*<.|.....J..|
|00000060| cd 4a ee 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.J......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 5b 08 00 00 |........|....[...|
|00000080| 2f 2f 20 53 70 61 63 65 | 48 61 63 6b 2e 63 0d 2f |// Space|Hack.c./|
|00000090| 2f 0d 2f 2f 20 41 20 73 | 61 6d 70 6c 65 20 74 68 |/.// A s|ample th|
|000000a0| 61 74 20 73 68 6f 77 73 | 20 68 6f 77 20 74 6f 20 |at shows| how to |
|000000b0| 64 6f 20 74 68 65 20 65 | 71 75 69 76 61 6c 65 6e |do the e|quivalen|
|000000c0| 74 20 6f 66 20 74 68 65 | 20 22 73 70 61 63 65 20 |t of the| "space |
|000000d0| 68 61 63 6b 22 0d 2f 2f | 20 75 6e 64 65 72 20 51 |hack".//| under Q|
|000000e0| 75 69 63 6b 44 72 61 77 | 20 47 58 2c 20 73 69 6e |uickDraw| GX, sin|
|000000f0| 63 65 20 74 68 61 74 20 | 68 61 63 6b 20 6e 6f 20 |ce that |hack no |
|00000100| 6c 6f 6e 67 65 72 20 77 | 6f 72 6b 73 20 28 61 6e |longer w|orks (an|
|00000110| 64 20 74 68 69 73 0d 2f | 2f 20 6e 65 77 20 6d 65 |d this./|/ new me|
|00000120| 74 68 6f 64 20 69 73 6e | 27 74 20 61 20 68 61 63 |thod isn|'t a hac|
|00000130| 6b 29 2e 0d 2f 2f 0d 2f | 2f 20 54 68 65 20 22 53 |k)..//./|/ The "S|
|00000140| 70 61 63 65 20 48 61 63 | 6b 22 20 69 73 20 74 68 |pace Hac|k" is th|
|00000150| 65 20 74 65 63 68 6e 69 | 71 75 65 20 6f 66 20 70 |e techni|que of p|
|00000160| 72 69 6e 74 69 6e 67 20 | 61 20 73 69 6e 67 6c 65 |rinting |a single|
|00000170| 20 73 70 61 63 65 20 28 | 27 20 27 29 0d 2f 2f 20 | space (|' ').// |
|00000180| 69 6e 20 61 20 66 6f 6e | 74 20 69 6e 20 6f 72 64 |in a fon|t in ord|
|00000190| 65 72 20 74 6f 20 67 65 | 74 20 74 68 61 74 20 66 |er to ge|t that f|
|000001a0| 6f 6e 74 20 72 65 73 69 | 64 65 6e 74 20 6f 6e 20 |ont resi|dent on |
|000001b0| 61 20 70 72 69 6e 74 65 | 72 20 73 6f 20 79 6f 75 |a printe|r so you|
|000001c0| 0d 2f 2f 20 63 61 6e 20 | 75 73 65 20 69 74 20 64 |.// can |use it d|
|000001d0| 69 72 65 63 74 6c 79 20 | 66 72 6f 6d 20 50 6f 73 |irectly |from Pos|
|000001e0| 74 53 63 72 69 70 74 2e | 0d 2f 2f 0d 2f 2f 20 55 |tScript.|.//.// U|
|000001f0| 6e 64 65 72 20 51 75 69 | 63 6b 44 72 61 77 20 47 |nder Qui|ckDraw G|
|00000200| 58 2c 20 70 72 69 6e 74 | 69 6e 67 20 61 20 73 70 |X, print|ing a sp|
|00000210| 61 63 65 20 67 65 74 73 | 20 61 20 66 6f 6e 74 20 |ace gets| a font |
|00000220| 74 68 61 74 20 63 6f 6e | 73 69 73 74 73 20 73 6f |that con|sists so|
|00000230| 6c 65 6c 79 0d 2f 2f 20 | 6f 66 20 61 20 73 70 61 |lely.// |of a spa|
|00000240| 63 65 20 6f 6e 20 74 68 | 65 20 70 72 69 6e 74 65 |ce on th|e printe|
|00000250| 72 2c 20 77 68 69 63 68 | 20 69 73 6e 27 74 20 65 |r, which| isn't e|
|00000260| 78 61 63 74 6c 79 20 77 | 68 61 74 20 79 6f 75 20 |xactly w|hat you |
|00000270| 77 61 6e 74 65 64 2e 0d | 2f 2f 0d 2f 2f 20 54 68 |wanted..|//.// Th|
|00000280| 65 20 66 75 6e 63 74 69 | 6f 6e 20 46 6f 6e 74 54 |e functi|on FontT|
|00000290| 6f 50 69 63 74 28 29 20 | 69 73 20 73 6f 6d 65 74 |oPict() |is somet|
|000002a0| 68 69 6e 67 20 79 6f 75 | 20 63 61 6e 20 64 72 6f |hing you| can dro|
|000002b0| 70 20 69 6e 74 6f 20 61 | 6e 20 61 70 70 0d 2f 2f |p into a|n app.//|
|000002c0| 20 77 68 69 63 68 20 75 | 73 65 73 20 74 68 69 73 | which u|ses this|
|000002d0| 20 74 65 63 68 6e 69 71 | 75 65 2e 20 49 74 20 63 | techniq|ue. It c|
|000002e0| 68 65 63 6b 73 20 66 6f | 72 20 74 68 65 20 70 72 |hecks fo|r the pr|
|000002f0| 65 73 65 6e 63 65 20 6f | 66 20 51 75 69 63 6b 44 |esence o|f QuickD|
|00000300| 72 61 77 0d 2f 2f 20 47 | 58 2c 20 61 6e 64 20 63 |raw.// G|X, and c|
|00000310| 61 6c 6c 73 20 74 68 65 | 20 63 6f 72 72 65 63 74 |alls the| correct|
|00000320| 20 63 6f 64 65 2e 20 49 | 6e 20 74 68 65 20 51 75 | code. I|n the Qu|
|00000330| 69 63 6b 44 72 61 77 20 | 47 58 20 63 61 73 65 2c |ickDraw |GX case,|
|00000340| 20 69 74 20 63 61 6c 6c | 73 0d 2f 2f 20 6d 61 6b | it call|s.// mak|
|00000350| 65 50 53 48 61 6e 64 6c | 65 2c 20 77 68 69 63 68 |ePSHandl|e, which|
|00000360| 20 6d 61 6b 65 73 2c 20 | 73 75 72 70 72 69 73 69 | makes, |surprisi|
|00000370| 6e 67 6c 79 20 65 6e 6f | 75 67 68 2c 20 61 20 68 |ngly eno|ugh, a h|
|00000380| 61 6e 64 6c 65 20 66 75 | 6c 6c 20 6f 66 0d 2f 2f |andle fu|ll of.//|
|00000390| 20 50 53 20 28 50 6f 73 | 74 53 63 72 69 70 74 29 | PS (Pos|tScript)|
|000003a0| 2c 20 77 68 69 63 68 20 | 79 6f 75 20 63 61 6e 20 |, which |you can |
|000003b0| 73 65 6e 64 20 74 6f 20 | 74 68 65 20 70 72 69 6e |send to |the prin|
|000003c0| 74 65 72 20 62 79 20 65 | 6d 62 65 64 64 69 6e 67 |ter by e|mbedding|
|000003d0| 20 69 74 0d 2f 2f 20 69 | 6e 20 61 20 50 69 63 43 | it.// i|n a PicC|
|000003e0| 6f 6d 6d 65 6e 74 2c 20 | 61 6e 64 20 63 61 6c 6c |omment, |and call|
|000003f0| 69 6e 67 20 44 72 61 77 | 50 69 63 74 75 72 65 20 |ing Draw|Picture |
|00000400| 6f 6e 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |on the r|esulting|
|00000410| 20 70 69 63 74 75 72 65 | 2e 0d 2f 2f 0d 2f 2f 20 | picture|..//.// |
|00000420| 4d 61 6b 65 50 53 48 61 | 6e 64 6c 65 28 29 20 62 |MakePSHa|ndle() b|
|00000430| 75 69 6c 64 73 20 61 6e | 20 65 6e 63 6f 64 69 6e |uilds an| encodin|
|00000440| 67 20 61 72 72 61 79 20 | 28 69 66 20 6f 6e 65 20 |g array |(if one |
|00000450| 69 73 6e 27 74 20 70 61 | 73 73 65 64 20 74 6f 20 |isn't pa|ssed to |
|00000460| 69 74 29 2c 0d 2f 2f 20 | 63 61 6c 6c 73 20 47 58 |it),.// |calls GX|
|00000470| 46 6c 61 74 74 65 6e 46 | 6f 6e 74 20 28 76 69 61 |FlattenF|ont (via|
|00000480| 20 61 20 77 72 61 70 70 | 65 72 20 66 75 6e 63 74 | a wrapp|er funct|
|00000490| 69 6f 6e 2c 20 46 6f 6e | 74 54 6f 48 61 6e 64 6c |ion, Fon|tToHandl|
|000004a0| 65 29 2c 20 61 6e 64 0d | 2f 2f 20 63 6c 65 61 6e |e), and.|// clean|
|000004b0| 73 20 75 70 20 61 6e 79 | 20 6d 65 73 73 65 73 2e |s up any| messes.|
|000004c0| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 3c 4d 65 6d 6f |..#inclu|de <Memo|
|000004d0| 72 79 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ry.h>.#i|nclude <|
|000004e0| 51 75 69 63 6b 44 72 61 | 77 2e 68 3e 0d 23 69 6e |QuickDra|w.h>.#in|
|000004f0| 63 6c 75 64 65 20 3c 53 | 63 72 69 70 74 2e 68 3e |clude <S|cript.h>|
|00000500| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 54 6f 6f 6c 55 |.#includ|e <ToolU|
|00000510| 74 69 6c 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |tils.h>.|#include|
|00000520| 20 3c 47 58 46 6f 6e 74 | 73 2e 68 3e 0d 23 69 6e | <GXFont|s.h>.#in|
|00000530| 63 6c 75 64 65 20 3c 47 | 58 47 72 61 70 68 69 63 |clude <G|XGraphic|
|00000540| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 47 |s.h>.#in|clude <G|
|00000550| 58 45 6e 76 69 72 6f 6e | 6d 65 6e 74 2e 68 3e 0d |XEnviron|ment.h>.|
|00000560| 23 69 6e 63 6c 75 64 65 | 20 3c 46 69 6c 65 73 2e |#include| <Files.|
|00000570| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 46 6f 6e |h>.#incl|ude <Fon|
|00000580| 74 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ts.h>.#i|nclude <|
|00000590| 53 74 61 6e 64 61 72 64 | 46 69 6c 65 2e 68 3e 0d |Standard|File.h>.|
|000005a0| 23 69 6e 63 6c 75 64 65 | 20 3c 47 65 73 74 61 6c |#include| <Gestal|
|000005b0| 74 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 52 |t.h>.#in|clude <R|
|000005c0| 65 73 6f 75 72 63 65 73 | 2e 68 3e 0d 0d 23 69 6e |esources|.h>..#in|
|000005d0| 63 6c 75 64 65 20 22 65 | 78 63 65 70 74 69 6f 6e |clude "e|xception|
|000005e0| 73 2e 68 22 0d 0d 74 79 | 70 65 64 65 66 09 73 74 |s.h"..ty|pedef.st|
|000005f0| 72 75 63 74 20 7b 0d 09 | 67 78 53 70 6f 6f 6c 42 |ruct {..|gxSpoolB|
|00000600| 6c 6f 63 6b 09 73 70 6f | 6f 6c 3b 0d 09 6c 6f 6e |lock.spo|ol;..lon|
|00000610| 67 09 09 09 72 65 66 65 | 72 65 6e 63 65 3b 0d 09 |g...refe|rence;..|
|00000620| 6c 6f 6e 67 09 09 09 70 | 6f 73 69 74 69 6f 6e 3b |long...p|osition;|
|00000630| 0d 09 6c 6f 6e 67 09 09 | 09 73 69 7a 65 3b 0d 09 |..long..|.size;..|
|00000640| 76 6f 69 64 09 09 09 2a | 64 61 74 61 3b 0d 09 76 |void...*|data;..v|
|00000650| 6f 69 64 09 09 09 2a 75 | 73 65 72 46 69 65 6c 64 |oid...*u|serField|
|00000660| 3b 0d 7d 20 75 73 65 72 | 53 70 6f 6f 6c 3b 0d 0d |;.} user|Spool;..|
|00000670| 23 64 65 66 69 6e 65 20 | 61 6c 6c 6f 63 61 74 69 |#define |allocati|
|00000680| 6f 6e 49 6e 63 72 65 6d | 65 6e 74 20 31 32 38 0d |onIncrem|ent 128.|
|00000690| 0d 23 64 65 66 69 6e 65 | 20 67 65 73 74 61 6c 74 |.#define| gestalt|
|000006a0| 47 58 56 65 72 73 69 6f | 6e 09 09 09 27 71 64 67 |GXVersio|n...'qdg|
|000006b0| 78 27 09 09 09 2f 2f 20 | 69 6e 20 50 72 69 6e 74 |x'...// |in Print|
|000006c0| 69 6e 67 4d 61 6e 61 67 | 65 72 2e 68 20 28 6f 6c |ingManag|er.h (ol|
|000006d0| 64 29 20 6f 72 20 47 58 | 50 72 69 6e 74 69 6e 67 |d) or GX|Printing|
|000006e0| 2e 68 20 28 6e 65 77 29 | 0d 23 64 65 66 69 6e 65 |.h (new)|.#define|
|000006f0| 20 67 65 73 74 61 6c 74 | 47 58 50 72 69 6e 74 69 | gestalt|GXPrinti|
|00000700| 6e 67 4d 67 72 56 65 72 | 73 69 6f 6e 09 27 70 6d |ngMgrVer|sion.'pm|
|00000710| 67 72 27 09 09 09 2f 2f | 20 69 6e 20 50 72 69 6e |gr'...//| in Prin|
|00000720| 74 69 6e 67 4d 61 6e 61 | 67 65 72 2e 68 20 28 6f |tingMana|ger.h (o|
|00000730| 6c 64 29 20 6f 72 20 47 | 58 50 72 69 6e 74 69 6e |ld) or G|XPrintin|
|00000740| 67 2e 68 20 28 6e 65 77 | 29 0d 0d 2f 2f 20 6f 75 |g.h (new|)..// ou|
|00000750| 72 20 65 6e 74 72 79 70 | 6f 69 6e 74 73 0d 50 69 |r entryp|oints.Pi|
|00000760| 63 48 61 6e 64 6c 65 20 | 46 6f 6e 74 54 6f 50 69 |cHandle |FontToPi|
|00000770| 63 74 28 73 68 6f 72 74 | 20 71 64 46 6f 6e 74 2c |ct(short| qdFont,|
|00000780| 20 73 68 6f 72 74 20 71 | 64 53 74 79 6c 65 29 3b | short q|dStyle);|
|00000790| 09 2f 2f 20 72 65 74 75 | 72 6e 73 20 61 20 50 49 |.// retu|rns a PI|
|000007a0| 43 54 20 73 75 69 74 61 | 62 6c 65 20 66 6f 72 20 |CT suita|ble for |
|000007b0| 70 72 69 6e 74 69 6e 67 | 0d 4f 53 45 72 72 20 4d |printing|.OSErr M|
|000007c0| 61 6b 65 50 53 48 61 6e | 64 6c 65 28 73 68 6f 72 |akePSHan|dle(shor|
|000007d0| 74 20 71 64 46 6f 6e 74 | 2c 20 63 68 61 72 20 71 |t qdFont|, char q|
|000007e0| 64 53 74 79 6c 65 2c 20 | 75 6e 73 69 67 6e 65 64 |dStyle, |unsigned|
|000007f0| 20 73 68 6f 72 74 20 2a | 65 6e 63 6f 64 69 6e 67 | short *|encoding|
|00000800| 41 72 72 61 79 2c 20 48 | 61 6e 64 6c 65 20 2a 65 |Array, H|andle *e|
|00000810| 6e 63 48 61 6e 64 6c 65 | 29 3b 0d 0d 2f 2f 20 75 |ncHandle|);..// u|
|00000820| 74 69 6c 69 74 79 20 66 | 75 6e 63 74 69 6f 6e 73 |tility f|unctions|
|00000830| 0d 73 74 61 74 69 63 20 | 48 61 6e 64 6c 65 20 46 |.static |Handle F|
|00000840| 6f 6e 74 54 6f 48 61 6e | 64 6c 65 28 67 78 46 6f |ontToHan|dle(gxFo|
|00000850| 6e 74 20 66 6f 6e 74 49 | 44 2c 20 75 6e 73 69 67 |nt fontI|D, unsig|
|00000860| 6e 65 64 20 73 68 6f 72 | 74 20 65 6e 63 6f 64 69 |ned shor|t encodi|
|00000870| 6e 67 5b 5d 29 3b 0d 73 | 74 61 74 69 63 20 6c 6f |ng[]);.s|tatic lo|
|00000880| 6e 67 09 4d 61 6b 65 4d | 61 63 38 42 69 74 45 6e |ng.MakeM|ac8BitEn|
|00000890| 63 6f 64 69 6e 67 28 67 | 78 46 6f 6e 74 20 74 68 |coding(g|xFont th|
|000008a0| 65 46 6f 6e 74 2c 20 75 | 6e 73 69 67 6e 65 64 20 |eFont, u|nsigned |
|000008b0| 73 68 6f 72 74 20 65 6e | 63 6f 64 69 6e 67 5b 5d |short en|coding[]|
|000008c0| 29 3b 0d 73 74 61 74 69 | 63 20 67 78 46 6f 6e 74 |);.stati|c gxFont|
|000008d0| 20 43 6f 6e 76 65 72 74 | 51 44 46 6f 6e 74 54 6f | Convert|QDFontTo|
|000008e0| 47 58 46 6f 6e 74 28 73 | 68 6f 72 74 20 71 64 46 |GXFont(s|hort qdF|
|000008f0| 6f 6e 74 2c 20 73 68 6f | 72 74 20 71 64 53 74 79 |ont, sho|rt qdSty|
|00000900| 6c 65 29 3b 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |le);.sta|tic void|
|00000910| 20 47 65 74 50 6f 73 74 | 53 63 72 69 70 74 46 6f | GetPost|ScriptFo|
|00000920| 6e 74 4e 61 6d 65 28 67 | 78 46 6f 6e 74 20 66 6f |ntName(g|xFont fo|
|00000930| 6e 74 49 44 2c 20 53 74 | 72 32 35 35 20 66 6f 6e |ntID, St|r255 fon|
|00000940| 74 4e 61 6d 65 29 3b 0d | 73 74 61 74 69 63 20 42 |tName);.|static B|
|00000950| 6f 6f 6c 65 61 6e 20 47 | 58 49 6e 73 74 61 6c 6c |oolean G|XInstall|
|00000960| 65 64 28 76 6f 69 64 29 | 3b 0d 73 74 61 74 69 63 |ed(void)|;.static|
|00000970| 20 76 6f 69 64 20 49 6e | 69 74 54 6f 6f 6c 62 6f | void In|itToolbo|
|00000980| 78 28 76 6f 69 64 29 3b | 0d 73 74 61 74 69 63 20 |x(void);|.static |
|00000990| 76 6f 69 64 20 44 75 6d | 70 48 61 6e 64 6c 65 54 |void Dum|pHandleT|
|000009a0| 6f 46 69 6c 65 28 50 69 | 63 48 61 6e 64 6c 65 20 |oFile(Pi|cHandle |
|000009b0| 64 61 74 61 29 3b 0d 0d | 0d 0d 0d 0d 0d 0d 76 6f |data);..|......vo|
|000009c0| 69 64 20 6d 61 69 6e 28 | 76 6f 69 64 29 0d 7b 0d |id main(|void).{.|
|000009d0| 09 50 69 63 48 61 6e 64 | 6c 65 09 70 69 63 74 75 |.PicHand|le.pictu|
|000009e0| 72 65 3b 0d 09 73 68 6f | 72 74 09 74 65 73 74 46 |re;..sho|rt.testF|
|000009f0| 6f 6e 74 52 65 66 20 3d | 20 30 3b 09 2f 2f 20 70 |ontRef =| 0;.// p|
|00000a00| 75 74 20 72 65 61 6c 20 | 66 6f 6e 74 20 72 65 66 |ut real |font ref|
|00000a10| 65 72 65 6e 63 65 20 68 | 65 72 65 0d 09 49 6e 69 |erence h|ere..Ini|
|00000a20| 74 54 6f 6f 6c 62 6f 78 | 28 29 3b 0d 0d 09 70 69 |tToolbox|();...pi|
|00000a30| 63 74 75 72 65 20 3d 20 | 46 6f 6e 74 54 6f 50 69 |cture = |FontToPi|
|00000a40| 63 74 28 74 65 73 74 46 | 6f 6e 74 52 65 66 2c 20 |ct(testF|ontRef, |
|00000a50| 30 29 3b 0d 09 44 75 6d | 70 48 61 6e 64 6c 65 54 |0);..Dum|pHandleT|
|00000a60| 6f 46 69 6c 65 28 70 69 | 63 74 75 72 65 29 3b 0d |oFile(pi|cture);.|
|00000a70| 7d 0d 0d 0d 0d 0d 2f 2f | 20 72 65 74 75 72 6e 20 |}.....//| return |
|00000a80| 61 20 70 69 63 74 20 74 | 68 61 74 20 63 61 6e 20 |a pict t|hat can |
|00000a90| 62 65 20 70 72 69 6e 74 | 65 64 20 76 69 61 20 44 |be print|ed via D|
|00000aa0| 72 61 77 50 69 63 74 75 | 72 65 0d 2f 2f 20 4e 4f |rawPictu|re.// NO|
|00000ab0| 54 45 3a 20 59 6f 75 27 | 64 20 62 65 74 74 65 72 |TE: You'|d better|
|00000ac0| 20 68 61 76 65 20 79 6f | 75 72 20 67 72 61 66 50 | have yo|ur grafP|
|00000ad0| 6f 72 74 20 73 65 74 75 | 70 20 62 65 66 6f 72 65 |ort setu|p before|
|00000ae0| 0d 2f 2f 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |.// call|ing this|
|00000af0| 2c 20 6f 72 20 69 74 27 | 6c 6c 20 62 6c 61 73 74 |, or it'|ll blast|
|00000b00| 20 74 68 65 20 77 69 6e | 64 6f 77 4d 61 6e 61 67 | the win|dowManag|
|00000b10| 65 72 20 70 6f 72 74 0d | 50 69 63 48 61 6e 64 6c |er port.|PicHandl|
|00000b20| 65 20 46 6f 6e 74 54 6f | 50 69 63 74 28 73 68 6f |e FontTo|Pict(sho|
|00000b30| 72 74 20 71 64 46 6f 6e | 74 2c 20 73 68 6f 72 74 |rt qdFon|t, short|
|00000b40| 20 71 64 53 74 79 6c 65 | 29 0d 7b 0d 09 52 65 63 | qdStyle|).{..Rec|
|00000b50| 74 09 09 74 68 65 52 65 | 63 74 20 3d 20 7b 30 2c |t..theRe|ct = {0,|
|00000b60| 20 30 2c 20 31 2c 20 31 | 7d 3b 0d 09 50 69 63 48 | 0, 1, 1|};..PicH|
|00000b70| 61 6e 64 6c 65 09 74 68 | 65 50 69 63 74 20 3d 20 |andle.th|ePict = |
|00000b80| 4f 70 65 6e 50 69 63 74 | 75 72 65 28 26 74 68 65 |OpenPict|ure(&the|
|00000b90| 52 65 63 74 29 3b 0d 09 | 63 6f 6e 73 74 09 73 68 |Rect);..|const.sh|
|00000ba0| 6f 72 74 09 6b 50 6f 73 | 74 53 63 72 69 70 74 48 |ort.kPos|tScriptH|
|00000bb0| 61 6e 64 6c 65 20 3d 20 | 31 39 32 3b 0d 0d 09 69 |andle = |192;...i|
|00000bc0| 66 20 28 47 58 49 6e 73 | 74 61 6c 6c 65 64 28 29 |f (GXIns|talled()|
|00000bd0| 29 20 7b 09 2f 2f 20 49 | 66 20 51 75 69 63 6b 44 |) {.// I|f QuickD|
|00000be0| 72 61 77 20 47 58 20 69 | 73 20 70 72 65 73 65 6e |raw GX i|s presen|
|00000bf0| 74 2c 20 75 73 65 20 74 | 68 65 20 6e 65 77 20 6d |t, use t|he new m|
|00000c00| 65 74 68 6f 64 0d 09 09 | 48 61 6e 64 6c 65 09 70 |ethod...|Handle.p|
|00000c10| 69 63 63 6f 6d 6d 65 6e | 74 48 64 6c 3b 0d 09 09 |iccommen|tHdl;...|
|00000c20| 2f 2f 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |// The f|ollowing|
|00000c30| 20 70 6f 69 6e 74 65 72 | 20 77 6f 75 6c 64 20 74 | pointer| would t|
|00000c40| 79 70 69 63 61 6c 6c 79 | 20 62 65 20 73 65 74 20 |ypically| be set |
|00000c50| 74 6f 20 61 6e 20 61 72 | 72 61 79 0d 09 09 2f 2f |to an ar|ray...//|
|00000c60| 20 6f 66 20 74 68 65 20 | 63 68 61 72 61 63 74 65 | of the |characte|
|00000c70| 72 73 20 79 6f 75 27 72 | 65 20 67 6f 69 6e 67 20 |rs you'r|e going |
|00000c80| 74 6f 20 75 73 65 2e 20 | 46 6f 72 20 74 65 73 74 |to use. |For test|
|00000c90| 20 70 75 72 70 6f 73 65 | 73 0d 09 09 2f 2f 20 77 | purpose|s...// w|
|00000ca0| 65 27 72 65 20 70 61 73 | 73 69 6e 67 20 61 20 6e |e're pas|sing a n|
|00000cb0| 69 6c 2c 20 77 68 69 63 | 68 20 73 61 79 20 22 47 |il, whic|h say "G|
|00000cc0| 69 76 65 20 6d 65 20 74 | 68 65 20 77 68 6f 6c 65 |ive me t|he whole|
|00000cd0| 20 66 6f 6e 74 2e 22 0d | 09 09 2f 2f 20 61 63 74 | font.".|..// act|
|00000ce0| 75 61 6c 6c 79 20 73 70 | 65 63 69 66 79 69 6e 67 |ually sp|ecifying|
|00000cf0| 20 74 68 65 20 65 6e 63 | 6f 64 69 6e 67 20 62 65 | the enc|oding be|
|00000d00| 63 6f 6d 65 73 20 63 72 | 69 74 69 63 61 6c 20 66 |comes cr|itical f|
|00000d10| 6f 72 20 43 4a 4b 0d 09 | 09 2f 2f 20 66 6f 6e 74 |or CJK..|.// font|
|00000d20| 73 2c 20 73 69 6e 63 65 | 20 73 65 6e 64 69 6e 67 |s, since| sending|
|00000d30| 20 74 68 65 20 77 68 6f | 6c 65 20 75 6d 70 74 79 | the who|le umpty|
|00000d40| 2d 74 68 6f 75 73 61 6e | 64 20 63 68 61 72 61 63 |-thousan|d charac|
|00000d50| 74 65 72 73 0d 09 09 2f | 2f 20 77 6f 75 6c 64 20 |ters.../|/ would |
|00000d60| 62 65 20 62 61 64 20 28 | 44 6f 6e 27 74 20 63 72 |be bad (|Don't cr|
|00000d70| 6f 73 73 20 74 68 65 20 | 62 65 61 6d 73 21 29 0d |oss the |beams!).|
|00000d80| 09 09 75 6e 73 69 67 6e | 65 64 09 73 68 6f 72 74 |..unsign|ed.short|
|00000d90| 09 2a 6d 79 45 6e 63 6f | 64 69 6e 67 20 3d 20 6e |.*myEnco|ding = n|
|00000da0| 69 6c 3b 0d 09 09 0d 09 | 09 4d 61 6b 65 50 53 48 |il;.....|.MakePSH|
|00000db0| 61 6e 64 6c 65 28 71 64 | 46 6f 6e 74 2c 71 64 53 |andle(qd|Font,qdS|
|00000dc0| 74 79 6c 65 2c 6d 79 45 | 6e 63 6f 64 69 6e 67 2c |tyle,myE|ncoding,|
|00000dd0| 26 70 69 63 63 6f 6d 6d | 65 6e 74 48 64 6c 29 3b |&piccomm|entHdl);|
|00000de0| 0d 09 09 50 69 63 43 6f | 6d 6d 65 6e 74 28 6b 50 |...PicCo|mment(kP|
|00000df0| 6f 73 74 53 63 72 69 70 | 74 48 61 6e 64 6c 65 2c |ostScrip|tHandle,|
|00000e00| 47 65 74 48 61 6e 64 6c | 65 53 69 7a 65 28 70 69 |GetHandl|eSize(pi|
|00000e10| 63 63 6f 6d 6d 65 6e 74 | 48 64 6c 29 2c 70 69 63 |ccomment|Hdl),pic|
|00000e20| 63 6f 6d 6d 65 6e 74 48 | 64 6c 29 3b 0d 09 7d 20 |commentH|dl);..} |
|00000e30| 65 6c 73 65 20 7b 09 09 | 09 09 2f 2f 20 69 66 20 |else {..|..// if |
|00000e40| 77 65 20 64 6f 6e 27 74 | 20 68 61 76 65 20 51 75 |we don't| have Qu|
|00000e50| 69 63 6b 44 72 61 77 20 | 47 58 2c 20 75 73 65 20 |ickDraw |GX, use |
|00000e60| 74 68 65 20 6f 6c 64 20 | 6d 65 74 68 6f 64 0d 09 |the old |method..|
|00000e70| 09 50 6f 69 6e 74 09 70 | 65 6e 50 6f 69 6e 74 3b |.Point.p|enPoint;|
|00000e80| 0d 0d 09 09 2f 2f 20 77 | 65 20 77 6f 75 6c 64 20 |....// w|e would |
|00000e90| 6e 6f 72 6d 61 6c 6c 79 | 20 73 65 74 20 74 68 65 |normally| set the|
|00000ea0| 20 63 6c 69 70 20 68 65 | 72 65 2c 20 62 75 74 20 | clip he|re, but |
|00000eb0| 73 69 6e 63 65 20 77 65 | 27 72 65 20 6a 75 73 74 |since we|'re just|
|00000ec0| 0d 09 09 2f 2f 20 64 72 | 61 77 69 6e 67 20 61 20 |...// dr|awing a |
|00000ed0| 73 70 61 63 65 2c 20 74 | 68 65 72 65 27 73 20 6e |space, t|here's n|
|00000ee0| 6f 74 20 72 65 61 6c 6c | 79 20 61 20 6e 65 65 64 |ot reall|y a need|
|00000ef0| 0d 09 09 47 65 74 50 65 | 6e 28 26 70 65 6e 50 6f |...GetPe|n(&penPo|
|00000f00| 69 6e 74 29 3b 09 2f 2f | 20 73 61 76 65 20 74 68 |int);.//| save th|
|00000f10| 65 20 70 65 6e 20 6c 6f | 63 61 74 69 6f 6e 0d 09 |e pen lo|cation..|
|00000f20| 09 54 65 78 74 46 6f 6e | 74 28 71 64 46 6f 6e 74 |.TextFon|t(qdFont|
|00000f30| 29 3b 0d 09 09 54 65 78 | 74 46 61 63 65 28 71 64 |);...Tex|tFace(qd|
|00000f40| 53 74 79 6c 65 29 3b 0d | 09 09 44 72 61 77 43 68 |Style);.|..DrawCh|
|00000f50| 61 72 28 27 20 27 29 3b | 0d 09 09 4d 6f 76 65 54 |ar(' ');|...MoveT|
|00000f60| 6f 28 70 65 6e 50 6f 69 | 6e 74 2e 68 2c 70 65 6e |o(penPoi|nt.h,pen|
|00000f70| 50 6f 69 6e 74 2e 76 29 | 3b 09 2f 2f 20 72 65 73 |Point.v)|;.// res|
|00000f80| 74 6f 72 65 20 74 68 65 | 20 70 65 6e 20 6c 6f 63 |tore the| pen loc|
|00000f90| 61 74 69 6f 6e 0d 09 7d | 0d 0d 09 43 6c 6f 73 65 |ation..}|...Close|
|00000fa0| 50 69 63 74 75 72 65 28 | 29 3b 0d 09 72 65 74 75 |Picture(|);..retu|
|00000fb0| 72 6e 28 74 68 65 50 69 | 63 74 29 3b 0d 7d 0d 0d |rn(thePi|ct);.}..|
|00000fc0| 0d 0d 0d 0d 0d 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |...../**|********|
|00000fd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000fe0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ff0| 2a 2a 2a 2a 2a 2a 2a 2a | 0d 09 4d 61 6b 65 20 61 |********|..Make a|
|00001000| 20 68 61 6e 64 6c 65 20 | 66 75 6c 6c 20 6f 66 20 | handle |full of |
|00001010| 70 6f 73 74 73 63 72 69 | 70 74 20 66 6f 6e 74 0d |postscri|pt font.|
|00001020| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001030| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001040| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001050| 2a 2a 2a 2f 0d 4f 53 45 | 72 72 20 4d 61 6b 65 50 |***/.OSE|rr MakeP|
|00001060| 53 48 61 6e 64 6c 65 28 | 73 68 6f 72 74 20 71 64 |SHandle(|short qd|
|00001070| 46 6f 6e 74 2c 20 63 68 | 61 72 20 71 64 53 74 79 |Font, ch|ar qdSty|
|00001080| 6c 65 2c 20 75 6e 73 69 | 67 6e 65 64 20 73 68 6f |le, unsi|gned sho|
|00001090| 72 74 20 2a 65 6e 63 6f | 64 69 6e 67 41 72 72 61 |rt *enco|dingArra|
|000010a0| 79 2c 20 48 61 6e 64 6c | 65 20 2a 6f 75 74 70 75 |y, Handl|e *outpu|
|000010b0| 74 48 61 6e 64 6c 65 29 | 0d 7b 0d 09 4f 53 45 72 |tHandle)|.{..OSEr|
|000010c0| 72 09 09 73 74 61 74 75 | 73 20 3d 20 6e 6f 45 72 |r..statu|s = noEr|
|000010d0| 72 3b 0d 09 67 78 46 6f | 6e 74 09 09 74 68 65 46 |r;..gxFo|nt..theF|
|000010e0| 6f 6e 74 3b 0d 09 75 6e | 73 69 67 6e 65 64 20 73 |ont;..un|signed s|
|000010f0| 68 6f 72 74 09 09 2a 6d | 79 45 6e 63 6f 64 69 6e |hort..*m|yEncodin|
|00001100| 67 3b 0d 09 42 6f 6f 6c | 65 61 6e 09 09 6d 61 64 |g;..Bool|ean..mad|
|00001110| 65 45 6e 63 6f 64 69 6e | 67 20 3d 20 66 61 6c 73 |eEncodin|g = fals|
|00001120| 65 3b 0d 0d 09 74 68 65 | 46 6f 6e 74 20 3d 20 43 |e;...the|Font = C|
|00001130| 6f 6e 76 65 72 74 51 44 | 46 6f 6e 74 54 6f 47 58 |onvertQD|FontToGX|
|00001140| 46 6f 6e 74 28 71 64 46 | 6f 6e 74 2c 71 64 53 74 |Font(qdF|ont,qdSt|
|00001150| 79 6c 65 29 3b 09 2f 2f | 20 63 6f 6e 76 65 72 74 |yle);.//| convert|
|00001160| 20 74 6f 20 61 20 67 78 | 46 6f 6e 74 0d 0d 09 69 | to a gx|Font...i|
|00001170| 66 20 28 21 65 6e 63 6f | 64 69 6e 67 41 72 72 61 |f (!enco|dingArra|
|00001180| 79 29 20 7b 0d 09 09 6c | 6f 6e 67 09 72 65 74 75 |y) {...l|ong.retu|
|00001190| 72 6e 4c 65 6e 67 74 68 | 3b 0d 0d 09 09 6d 79 45 |rnLength|;....myE|
|000011a0| 6e 63 6f 64 69 6e 67 20 | 3d 20 28 75 6e 73 69 67 |ncoding |= (unsig|
|000011b0| 6e 65 64 20 73 68 6f 72 | 74 20 2a 29 4e 65 77 50 |ned shor|t *)NewP|
|000011c0| 74 72 43 6c 65 61 72 28 | 32 35 36 20 2a 20 73 69 |trClear(|256 * si|
|000011d0| 7a 65 6f 66 28 73 68 6f | 72 74 29 29 3b 0d 09 09 |zeof(sho|rt));...|
|000011e0| 72 65 74 75 72 6e 4c 65 | 6e 67 74 68 20 3d 20 4d |returnLe|ngth = M|
|000011f0| 61 6b 65 4d 61 63 38 42 | 69 74 45 6e 63 6f 64 69 |akeMac8B|itEncodi|
|00001200| 6e 67 28 74 68 65 46 6f | 6e 74 2c 20 6d 79 45 6e |ng(theFo|nt, myEn|
|00001210| 63 6f 64 69 6e 67 29 3b | 0d 09 09 69 66 20 28 72 |coding);|...if (r|
|00001220| 65 74 75 72 6e 4c 65 6e | 67 74 68 20 21 3d 20 32 |eturnLen|gth != 2|
|00001230| 35 36 29 20 7b 0d 09 09 | 09 44 65 62 75 67 53 74 |56) {...|.DebugSt|
|00001240| 72 28 22 5c 70 48 6d 6d | 2e 20 57 65 20 64 69 64 |r("\pHmm|. We did|
|00001250| 6e 27 74 20 67 65 74 20 | 61 20 66 75 6c 6c 20 65 |n't get |a full e|
|00001260| 6e 63 6f 64 69 6e 67 2e | 22 29 3b 0d 09 09 09 72 |ncoding.|");....r|
|00001270| 65 74 75 72 6e 28 72 65 | 74 75 72 6e 4c 65 6e 67 |eturn(re|turnLeng|
|00001280| 74 68 29 3b 09 2f 2f 20 | 70 61 73 73 20 74 68 65 |th);.// |pass the|
|00001290| 20 65 72 72 6f 72 20 61 | 6c 6f 6e 67 0d 09 09 7d | error a|long...}|
|000012a0| 0d 09 09 6d 61 64 65 45 | 6e 63 6f 64 69 6e 67 20 |...madeE|ncoding |
|000012b0| 3d 20 74 72 75 65 3b 0d | 09 7d 20 65 6c 73 65 20 |= true;.|.} else |
|000012c0| 7b 0d 09 09 6d 79 45 6e | 63 6f 64 69 6e 67 20 3d |{...myEn|coding =|
|000012d0| 20 65 6e 63 6f 64 69 6e | 67 41 72 72 61 79 3b 0d | encodin|gArray;.|
|000012e0| 09 7d 0d 0d 09 2a 6f 75 | 74 70 75 74 48 61 6e 64 |.}...*ou|tputHand|
|000012f0| 6c 65 20 3d 20 46 6f 6e | 74 54 6f 48 61 6e 64 6c |le = Fon|tToHandl|
|00001300| 65 28 74 68 65 46 6f 6e | 74 2c 20 6d 79 45 6e 63 |e(theFon|t, myEnc|
|00001310| 6f 64 69 6e 67 29 3b 0d | 0d 09 69 66 20 28 6d 61 |oding);.|..if (ma|
|00001320| 64 65 45 6e 63 6f 64 69 | 6e 67 29 20 44 69 73 70 |deEncodi|ng) Disp|
|00001330| 6f 73 65 50 74 72 28 28 | 50 74 72 29 6d 79 45 6e |osePtr((|Ptr)myEn|
|00001340| 63 6f 64 69 6e 67 29 3b | 0d 0d 09 73 74 61 74 75 |coding);|...statu|
|00001350| 73 20 3d 20 4d 65 6d 45 | 72 72 6f 72 28 29 3b 0d |s = MemE|rror();.|
|00001360| 09 69 66 20 28 73 74 61 | 74 75 73 20 3d 3d 20 6e |.if (sta|tus == n|
|00001370| 6f 45 72 72 29 20 7b 0d | 09 09 73 74 61 74 75 73 |oErr) {.|..status|
|00001380| 20 3d 20 47 58 47 65 74 | 47 72 61 70 68 69 63 73 | = GXGet|Graphics|
|00001390| 45 72 72 6f 72 28 6e 69 | 6c 29 3b 0d 09 09 69 66 |Error(ni|l);...if|
|000013a0| 20 28 73 74 61 74 75 73 | 20 21 3d 20 6e 6f 45 72 | (status| != noEr|
|000013b0| 72 29 20 7b 0d 09 09 09 | 44 69 73 70 6f 73 65 48 |r) {....|DisposeH|
|000013c0| 61 6e 64 6c 65 28 2a 6f | 75 74 70 75 74 48 61 6e |andle(*o|utputHan|
|000013d0| 64 6c 65 29 3b 0d 09 09 | 09 2a 6f 75 74 70 75 74 |dle);...|.*output|
|000013e0| 48 61 6e 64 6c 65 20 3d | 20 6e 69 6c 3b 0d 09 09 |Handle =| nil;...|
|000013f0| 7d 0d 09 7d 0d 09 72 65 | 74 75 72 6e 28 73 74 61 |}..}..re|turn(sta|
|00001400| 74 75 73 29 3b 0d 7d 0d | 0d 0d 0d 0d 0d 0d 2f 2f |tus);.}.|......//|
|00001410| 0d 2f 2f 20 55 74 69 6c | 69 74 79 20 66 75 6e 63 |.// Util|ity func|
|00001420| 74 69 6f 6e 73 0d 2f 2f | 0d 73 74 61 74 69 63 20 |tions.//|.static |
|00001430| 42 6f 6f 6c 65 61 6e 20 | 47 58 49 6e 73 74 61 6c |Boolean |GXInstal|
|00001440| 6c 65 64 28 76 6f 69 64 | 29 0d 7b 0d 09 6c 6f 6e |led(void|).{..lon|
|00001450| 67 20 76 65 72 73 69 6f | 6e 3b 0d 0d 09 69 66 20 |g versio|n;...if |
|00001460| 28 47 65 73 74 61 6c 74 | 28 67 65 73 74 61 6c 74 |(Gestalt|(gestalt|
|00001470| 47 58 56 65 72 73 69 6f | 6e 2c 20 26 76 65 72 73 |GXVersio|n, &vers|
|00001480| 69 6f 6e 29 20 3d 3d 20 | 6e 6f 45 72 72 29 0d 09 |ion) == |noErr)..|
|00001490| 09 69 66 20 28 47 65 73 | 74 61 6c 74 28 67 65 73 |.if (Ges|talt(ges|
|000014a0| 74 61 6c 74 47 58 50 72 | 69 6e 74 69 6e 67 4d 67 |taltGXPr|intingMg|
|000014b0| 72 56 65 72 73 69 6f 6e | 2c 20 26 76 65 72 73 69 |rVersion|, &versi|
|000014c0| 6f 6e 29 20 3d 3d 20 6e | 6f 45 72 72 29 0d 09 09 |on) == n|oErr)...|
|000014d0| 09 72 65 74 75 72 6e 28 | 74 72 75 65 29 3b 0d 09 |.return(|true);..|
|000014e0| 72 65 74 75 72 6e 28 66 | 61 6c 73 65 29 3b 0d 7d |return(f|alse);.}|
|000014f0| 0d 0d 2f 2f 20 67 65 74 | 20 74 68 65 20 70 6f 73 |..// get| the pos|
|00001500| 74 53 63 72 69 70 74 20 | 75 6e 69 71 75 65 20 6e |tScript |unique n|
|00001510| 61 6d 65 20 6f 66 20 74 | 68 65 20 66 6f 6e 74 2e |ame of t|he font.|
|00001520| 20 52 65 74 75 72 6e 20 | 61 20 43 20 53 74 72 69 | Return |a C Stri|
|00001530| 6e 67 2e 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |ng..stat|ic void |
|00001540| 47 65 74 50 6f 73 74 53 | 63 72 69 70 74 46 6f 6e |GetPostS|criptFon|
|00001550| 74 4e 61 6d 65 28 67 78 | 46 6f 6e 74 20 66 6f 6e |tName(gx|Font fon|
|00001560| 74 49 44 2c 20 53 74 72 | 32 35 35 20 66 6f 6e 74 |tID, Str|255 font|
|00001570| 4e 61 6d 65 29 0d 7b 0d | 09 6c 6f 6e 67 20 6c 65 |Name).{.|.long le|
|00001580| 6e 67 74 68 3b 0d 09 6c | 65 6e 67 74 68 20 3d 20 |ngth;..l|ength = |
|00001590| 47 58 46 69 6e 64 46 6f | 6e 74 4e 61 6d 65 28 66 |GXFindFo|ntName(f|
|000015a0| 6f 6e 74 49 44 2c 20 67 | 78 50 6f 73 74 73 63 72 |ontID, g|xPostscr|
|000015b0| 69 70 74 46 6f 6e 74 4e | 61 6d 65 2c 20 67 78 4e |iptFontN|ame, gxN|
|000015c0| 6f 50 6c 61 74 66 6f 72 | 6d 2c 0d 09 09 67 78 4e |oPlatfor|m,...gxN|
|000015d0| 6f 53 63 72 69 70 74 2c | 20 67 78 4e 6f 4c 61 6e |oScript,| gxNoLan|
|000015e0| 67 75 61 67 65 2c 20 66 | 6f 6e 74 4e 61 6d 65 2c |guage, f|ontName,|
|000015f0| 20 6e 69 6c 29 3b 0d 0d | 09 2f 2f 20 74 68 65 20 | nil);..|.// the |
|00001600| 50 6f 73 74 53 63 72 69 | 70 74 20 6e 61 6d 65 20 |PostScri|pt name |
|00001610| 73 68 6f 75 6c 64 6e 27 | 74 20 65 76 65 72 20 62 |shouldn'|t ever b|
|00001620| 65 20 6d 6f 72 65 20 74 | 68 61 6e 20 32 35 35 20 |e more t|han 255 |
|00001630| 63 68 61 72 61 63 74 65 | 72 73 0d 09 2f 2f 20 6c |characte|rs..// l|
|00001640| 6f 6e 67 2c 20 62 75 74 | 20 69 66 20 69 74 20 69 |ong, but| if it i|
|00001650| 73 2c 20 73 6f 6d 65 74 | 68 69 6e 67 20 68 61 73 |s, somet|hing has|
|00001660| 20 67 6f 6e 65 20 68 6f | 72 72 69 62 6c 79 20 61 | gone ho|rribly a|
|00001670| 77 72 79 2e 20 42 65 73 | 74 20 74 6f 0d 09 2f 2f |wry. Bes|t to..//|
|00001680| 20 61 74 20 6c 65 61 73 | 74 20 64 65 74 65 63 74 | at leas|t detect|
|00001690| 20 74 68 65 20 65 72 72 | 6f 72 2c 20 72 61 74 68 | the err|or, rath|
|000016a0| 65 72 20 74 68 61 6e 20 | 6c 65 74 20 69 74 20 70 |er than |let it p|
|000016b0| 72 6f 70 61 67 61 74 65 | 20 61 6e 64 0d 09 2f 2f |ropagate| and..//|
|000016c0| 20 74 72 61 73 68 20 73 | 6f 6d 65 74 68 69 6e 67 | trash s|omething|
|000016d0| 20 65 6c 73 65 2e 0d 09 | 69 66 20 28 6c 65 6e 67 | else...|if (leng|
|000016e0| 74 68 20 3e 20 32 35 35 | 29 20 44 65 62 75 67 53 |th > 255|) DebugS|
|000016f0| 74 72 28 22 5c 70 4f 4f | 50 53 2e 20 57 65 27 72 |tr("\pOO|PS. We'r|
|00001700| 65 20 64 65 61 64 20 69 | 6e 20 74 68 65 20 77 61 |e dead i|n the wa|
|00001710| 74 65 72 2e 22 29 3b 0d | 09 65 6c 73 65 20 66 6f |ter.");.|.else fo|
|00001720| 6e 74 4e 61 6d 65 5b 6c | 65 6e 67 74 68 5d 3d 30 |ntName[l|ength]=0|
|00001730| 3b 09 2f 2f 20 73 74 72 | 69 6e 67 20 69 73 6e 27 |;.// str|ing isn'|
|00001740| 74 20 74 65 72 6d 69 6e | 61 74 65 64 2c 20 73 6f |t termin|ated, so|
|00001750| 20 77 65 20 64 6f 20 69 | 74 0d 7d 0d 0d 73 74 61 | we do i|t.}..sta|
|00001760| 74 69 63 20 6c 6f 6e 67 | 20 48 61 6e 64 6c 65 53 |tic long| HandleS|
|00001770| 70 6f 6f 6c 50 72 6f 63 | 28 67 78 53 70 6f 6f 6c |poolProc|(gxSpool|
|00001780| 43 6f 6d 6d 61 6e 64 20 | 63 6f 6d 6d 61 6e 64 2c |Command |command,|
|00001790| 20 20 75 73 65 72 53 70 | 6f 6f 6c 20 2a 62 6c 6f | userSp|ool *blo|
|000017a0| 63 6b 29 0d 7b 0d 09 4f | 53 45 72 72 09 09 73 74 |ck).{..O|SErr..st|
|000017b0| 61 74 75 73 20 3d 20 6e | 6f 45 72 72 3b 0d 09 0d |atus = n|oErr;...|
|000017c0| 09 73 77 69 74 63 68 20 | 28 63 6f 6d 6d 61 6e 64 |.switch |(command|
|000017d0| 29 20 20 7b 0d 09 09 63 | 61 73 65 20 67 78 4f 70 |) {...c|ase gxOp|
|000017e0| 65 6e 52 65 61 64 53 70 | 6f 6f 6c 3a 0d 09 09 09 |enReadSp|ool:....|
|000017f0| 62 6c 6f 63 6b 2d 3e 73 | 69 7a 65 20 3d 20 30 3b |block->s|ize = 0;|
|00001800| 0d 09 09 09 62 6c 6f 63 | 6b 2d 3e 70 6f 73 69 74 |....bloc|k->posit|
|00001810| 69 6f 6e 20 3d 20 30 3b | 0d 09 09 09 62 72 65 61 |ion = 0;|....brea|
|00001820| 6b 3b 0d 09 09 63 61 73 | 65 20 67 78 4f 70 65 6e |k;...cas|e gxOpen|
|00001830| 57 72 69 74 65 53 70 6f | 6f 6c 3a 0d 09 09 09 62 |WriteSpo|ol:....b|
|00001840| 6c 6f 63 6b 2d 3e 64 61 | 74 61 20 3d 20 4e 65 77 |lock->da|ta = New|
|00001850| 48 61 6e 64 6c 65 28 61 | 6c 6c 6f 63 61 74 69 6f |Handle(a|llocatio|
|00001860| 6e 49 6e 63 72 65 6d 65 | 6e 74 29 3b 0d 09 09 09 |nIncreme|nt);....|
|00001870| 62 6c 6f 63 6b 2d 3e 73 | 69 7a 65 20 3d 20 61 6c |block->s|ize = al|
|00001880| 6c 6f 63 61 74 69 6f 6e | 49 6e 63 72 65 6d 65 6e |location|Incremen|
|00001890| 74 3b 0d 09 09 09 62 6c | 6f 63 6b 2d 3e 70 6f 73 |t;....bl|ock->pos|
|000018a0| 69 74 69 6f 6e 20 3d 20 | 30 3b 0d 09 09 09 73 74 |ition = |0;....st|
|000018b0| 61 74 75 73 20 3d 20 4d | 65 6d 45 72 72 6f 72 28 |atus = M|emError(|
|000018c0| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|000018d0| 61 73 65 20 67 78 52 65 | 61 64 53 70 6f 6f 6c 3a |ase gxRe|adSpool:|
|000018e0| 0d 09 09 09 42 6c 6f 63 | 6b 4d 6f 76 65 28 28 2a |....Bloc|kMove((*|
|000018f0| 28 63 68 61 72 20 2a 2a | 29 20 62 6c 6f 63 6b 2d |(char **|) block-|
|00001900| 3e 64 61 74 61 29 20 2b | 20 62 6c 6f 63 6b 2d 3e |>data) +| block->|
|00001910| 70 6f 73 69 74 69 6f 6e | 2c 0d 09 09 09 09 62 6c |position|,.....bl|
|00001920| 6f 63 6b 2d 3e 73 70 6f | 6f 6c 2e 62 75 66 66 65 |ock->spo|ol.buffe|
|00001930| 72 2c 0d 09 09 09 09 62 | 6c 6f 63 6b 2d 3e 73 70 |r,.....b|lock->sp|
|00001940| 6f 6f 6c 2e 63 6f 75 6e | 74 29 3b 0d 09 09 09 62 |ool.coun|t);....b|
|00001950| 6c 6f 63 6b 2d 3e 70 6f | 73 69 74 69 6f 6e 20 2b |lock->po|sition +|
|00001960| 3d 20 62 6c 6f 63 6b 2d | 3e 73 70 6f 6f 6c 2e 63 |= block-|>spool.c|
|00001970| 6f 75 6e 74 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d |ount;...|.break;.|
|00001980| 09 09 63 61 73 65 20 67 | 78 57 72 69 74 65 53 70 |..case g|xWriteSp|
|00001990| 6f 6f 6c 3a 0d 09 09 09 | 7b 0d 09 09 09 09 72 65 |ool:....|{.....re|
|000019a0| 67 69 73 74 65 72 20 6c | 6f 6e 67 20 6f 6c 64 50 |gister l|ong oldP|
|000019b0| 6f 73 69 74 69 6f 6e 3b | 0d 09 09 09 09 0d 09 09 |osition;|........|
|000019c0| 09 09 6f 6c 64 50 6f 73 | 69 74 69 6f 6e 20 3d 20 |..oldPos|ition = |
|000019d0| 62 6c 6f 63 6b 2d 3e 70 | 6f 73 69 74 69 6f 6e 3b |block->p|osition;|
|000019e0| 0d 09 09 09 09 62 6c 6f | 63 6b 2d 3e 70 6f 73 69 |.....blo|ck->posi|
|000019f0| 74 69 6f 6e 20 2b 3d 20 | 62 6c 6f 63 6b 2d 3e 73 |tion += |block->s|
|00001a00| 70 6f 6f 6c 2e 63 6f 75 | 6e 74 3b 0d 09 09 09 09 |pool.cou|nt;.....|
|00001a10| 0d 09 09 09 09 2f 2a 20 | 6d 61 6b 65 20 73 75 72 |...../* |make sur|
|00001a20| 65 20 74 68 65 72 65 27 | 73 20 72 6f 6f 6d 20 66 |e there'|s room f|
|00001a30| 6f 72 20 6f 6e 65 20 62 | 75 66 66 65 72 20 70 61 |or one b|uffer pa|
|00001a40| 73 74 20 63 75 72 72 65 | 6e 74 20 70 6f 69 6e 74 |st curre|nt point|
|00001a50| 65 72 20 2a 2f 0d 09 09 | 09 09 69 66 20 28 62 6c |er */...|..if (bl|
|00001a60| 6f 63 6b 2d 3e 70 6f 73 | 69 74 69 6f 6e 20 2b 20 |ock->pos|ition + |
|00001a70| 62 6c 6f 63 6b 2d 3e 73 | 70 6f 6f 6c 2e 62 75 66 |block->s|pool.buf|
|00001a80| 66 65 72 53 69 7a 65 20 | 3e 20 62 6c 6f 63 6b 2d |ferSize |> block-|
|00001a90| 3e 73 69 7a 65 29 20 7b | 0d 09 09 09 09 09 62 6c |>size) {|......bl|
|00001aa0| 6f 63 6b 2d 3e 73 69 7a | 65 20 2b 3d 20 62 6c 6f |ock->siz|e += blo|
|00001ab0| 63 6b 2d 3e 73 70 6f 6f | 6c 2e 62 75 66 66 65 72 |ck->spoo|l.buffer|
|00001ac0| 53 69 7a 65 3b 0d 09 09 | 09 09 09 48 55 6e 6c 6f |Size;...|...HUnlo|
|00001ad0| 63 6b 28 28 48 61 6e 64 | 6c 65 29 20 62 6c 6f 63 |ck((Hand|le) bloc|
|00001ae0| 6b 2d 3e 64 61 74 61 29 | 3b 0d 09 09 09 09 09 53 |k->data)|;......S|
|00001af0| 65 74 48 61 6e 64 6c 65 | 53 69 7a 65 28 28 48 61 |etHandle|Size((Ha|
|00001b00| 6e 64 6c 65 29 20 62 6c | 6f 63 6b 2d 3e 64 61 74 |ndle) bl|ock->dat|
|00001b10| 61 2c 20 62 6c 6f 63 6b | 2d 3e 73 69 7a 65 29 3b |a, block|->size);|
|00001b20| 0d 09 09 09 09 09 48 4c | 6f 63 6b 28 28 48 61 6e |......HL|ock((Han|
|00001b30| 64 6c 65 29 20 62 6c 6f | 63 6b 2d 3e 64 61 74 61 |dle) blo|ck->data|
|00001b40| 29 3b 0d 09 09 09 09 09 | 73 74 61 74 75 73 20 3d |);......|status =|
|00001b50| 20 4d 65 6d 45 72 72 6f | 72 28 29 3b 0d 09 09 09 | MemErro|r();....|
|00001b60| 09 7d 0d 09 09 09 09 69 | 66 20 28 73 74 61 74 75 |.}.....i|f (statu|
|00001b70| 73 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 09 09 09 |s == noE|rr).....|
|00001b80| 42 6c 6f 63 6b 4d 6f 76 | 65 28 62 6c 6f 63 6b 2d |BlockMov|e(block-|
|00001b90| 3e 73 70 6f 6f 6c 2e 62 | 75 66 66 65 72 2c 0d 09 |>spool.b|uffer,..|
|00001ba0| 09 09 09 09 28 2a 28 63 | 68 61 72 20 2a 2a 29 20 |....(*(c|har **) |
|00001bb0| 62 6c 6f 63 6b 2d 3e 64 | 61 74 61 20 2b 20 6f 6c |block->d|ata + ol|
|00001bc0| 64 50 6f 73 69 74 69 6f | 6e 29 2c 0d 09 09 09 09 |dPositio|n),.....|
|00001bd0| 09 62 6c 6f 63 6b 2d 3e | 73 70 6f 6f 6c 2e 63 6f |.block->|spool.co|
|00001be0| 75 6e 74 29 3b 0d 09 09 | 09 7d 0d 09 09 09 62 72 |unt);...|.}....br|
|00001bf0| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 67 78 43 6c |eak;...c|ase gxCl|
|00001c00| 6f 73 65 53 70 6f 6f 6c | 3a 0d 09 09 09 53 65 74 |oseSpool|:....Set|
|00001c10| 48 61 6e 64 6c 65 53 69 | 7a 65 28 28 48 61 6e 64 |HandleSi|ze((Hand|
|00001c20| 6c 65 29 20 62 6c 6f 63 | 6b 2d 3e 64 61 74 61 2c |le) bloc|k->data,|
|00001c30| 20 62 6c 6f 63 6b 2d 3e | 70 6f 73 69 74 69 6f 6e | block->|position|
|00001c40| 29 3b 0d 09 09 09 73 74 | 61 74 75 73 20 3d 20 4d |);....st|atus = M|
|00001c50| 65 6d 45 72 72 6f 72 28 | 29 3b 0d 09 09 09 62 72 |emError(|);....br|
|00001c60| 65 61 6b 3b 0d 09 7d 20 | 0d 09 72 65 74 75 72 6e |eak;..} |..return|
|00001c70| 28 73 74 61 74 75 73 29 | 3b 0d 7d 0d 0d 2f 2a 2a |(status)|;.}../**|
|00001c80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001c90| 2a 2a 2a 2a 2a 0d 09 57 | 72 61 70 70 65 72 20 66 |*****..W|rapper f|
|00001ca0| 6f 72 20 63 61 6c 6c 20 | 74 6f 20 47 58 46 6c 61 |or call |to GXFla|
|00001cb0| 74 74 65 6e 46 6f 6e 74 | 20 74 6f 20 6d 61 6b 65 |ttenFont| to make|
|00001cc0| 20 69 74 20 65 61 73 69 | 65 72 0d 0d 09 66 6f 6e | it easi|er...fon|
|00001cd0| 74 49 44 3a 09 09 74 68 | 65 20 67 78 46 6f 6e 74 |tID:..th|e gxFont|
|00001ce0| 20 72 65 66 65 72 65 6e | 63 65 20 74 6f 20 75 73 | referen|ce to us|
|00001cf0| 65 20 66 6f 72 20 6d 61 | 6b 69 6e 67 20 74 68 65 |e for ma|king the|
|00001d00| 20 65 6e 63 6f 64 69 6e | 67 2e 0d 09 65 6e 63 6f | encodin|g...enco|
|00001d10| 64 69 6e 67 3a 09 54 68 | 65 20 61 72 72 61 79 20 |ding:.Th|e array |
|00001d20| 6f 66 20 67 6c 79 70 68 | 20 63 6f 64 65 73 20 69 |of glyph| codes i|
|00001d30| 6e 64 69 63 61 74 69 6e | 67 20 6f 72 64 65 72 0d |ndicatin|g order.|
|00001d40| 09 09 09 09 61 6e 64 20 | 69 64 27 73 20 6f 66 20 |....and |id's of |
|00001d50| 67 6c 79 70 68 73 20 74 | 6f 20 6d 61 6b 65 20 65 |glyphs t|o make e|
|00001d60| 6e 63 6f 64 69 6e 67 20 | 66 6f 72 2e 0d 2a 2a 2a |ncoding |for..***|
|00001d70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0d 73 74 61 74 |********|**/.stat|
|00001d80| 69 63 20 48 61 6e 64 6c | 65 20 46 6f 6e 74 54 6f |ic Handl|e FontTo|
|00001d90| 48 61 6e 64 6c 65 28 67 | 78 46 6f 6e 74 20 66 6f |Handle(g|xFont fo|
|00001da0| 6e 74 49 44 2c 20 75 6e | 73 69 67 6e 65 64 20 73 |ntID, un|signed s|
|00001db0| 68 6f 72 74 20 65 6e 63 | 6f 64 69 6e 67 5b 32 35 |hort enc|oding[25|
|00001dc0| 36 5d 29 0d 7b 0d 09 75 | 73 65 72 53 70 6f 6f 6c |6]).{..u|serSpool|
|00001dd0| 09 09 62 6c 6f 63 6b 3b | 0d 09 73 63 61 6c 65 72 |..block;|..scaler|
|00001de0| 53 74 72 65 61 6d 09 73 | 74 72 65 61 6d 3b 0d 09 |Stream.s|tream;..|
|00001df0| 53 74 72 32 35 35 09 09 | 09 66 6f 6e 74 4e 61 6d |Str255..|.fontNam|
|00001e00| 65 3b 0d 09 0d 09 62 6c | 6f 63 6b 2e 73 70 6f 6f |e;....bl|ock.spoo|
|00001e10| 6c 2e 73 70 6f 6f 6c 50 | 72 6f 63 65 64 75 72 65 |l.spoolP|rocedure|
|00001e20| 20 3d 20 4e 65 77 67 78 | 53 70 6f 6f 6c 50 72 6f | = Newgx|SpoolPro|
|00001e30| 63 28 48 61 6e 64 6c 65 | 53 70 6f 6f 6c 50 72 6f |c(Handle|SpoolPro|
|00001e40| 63 29 3b 0d 09 62 6c 6f | 63 6b 2e 73 70 6f 6f 6c |c);..blo|ck.spool|
|00001e50| 2e 62 75 66 66 65 72 20 | 3d 20 6e 69 6c 3b 0d 09 |.buffer |= nil;..|
|00001e60| 62 6c 6f 63 6b 2e 73 70 | 6f 6f 6c 2e 62 75 66 66 |block.sp|ool.buff|
|00001e70| 65 72 53 69 7a 65 20 3d | 20 30 3b 0d 09 0d 09 73 |erSize =| 0;....s|
|00001e80| 74 72 65 61 6d 2e 73 74 | 72 65 61 6d 52 65 66 43 |tream.st|reamRefC|
|00001e90| 6f 6e 20 3d 20 66 6f 6e | 74 49 44 3b 0d 09 73 74 |on = fon|tID;..st|
|00001ea0| 72 65 61 6d 2e 74 79 70 | 65 73 20 3d 20 74 79 70 |ream.typ|es = typ|
|00001eb0| 65 31 53 74 72 65 61 6d | 54 79 70 65 3b 0d 23 69 |e1Stream|Type;.#i|
|00001ec0| 66 20 4a 55 53 54 5f 45 | 4e 43 4f 44 49 4e 47 0d |f JUST_E|NCODING.|
|00001ed0| 09 2f 2f 20 48 61 76 65 | 20 66 6f 6e 74 20 73 63 |.// Have| font sc|
|00001ee0| 61 6c 65 72 20 6d 61 6b | 65 20 6a 75 73 74 20 61 |aler mak|e just a|
|00001ef0| 6e 20 65 6e 63 6f 64 69 | 6e 67 20 66 6f 72 20 75 |n encodi|ng for u|
|00001f00| 73 0d 09 73 74 72 65 61 | 6d 2e 61 63 74 69 6f 6e |s..strea|m.action|
|00001f10| 20 3d 20 65 6e 63 6f 64 | 69 6e 67 4f 6e 6c 79 53 | = encod|ingOnlyS|
|00001f20| 74 72 65 61 6d 41 63 74 | 69 6f 6e 3b 0d 23 65 6c |treamAct|ion;.#el|
|00001f30| 73 65 0d 09 2f 2f 20 47 | 65 74 20 61 20 64 6f 77 |se..// G|et a dow|
|00001f40| 6e 6c 6f 61 64 61 62 6c | 65 20 66 6f 6e 74 0d 09 |nloadabl|e font..|
|00001f50| 73 74 72 65 61 6d 2e 61 | 63 74 69 6f 6e 20 3d 20 |stream.a|ction = |
|00001f60| 64 6f 77 6e 6c 6f 61 64 | 53 74 72 65 61 6d 41 63 |download|StreamAc|
|00001f70| 74 69 6f 6e 3b 0d 23 65 | 6e 64 69 66 0d 09 73 74 |tion;.#e|ndif..st|
|00001f80| 72 65 61 6d 2e 6d 65 6d | 6f 72 79 53 69 7a 65 20 |ream.mem|orySize |
|00001f90| 3d 20 30 3b 0d 09 73 74 | 72 65 61 6d 2e 76 61 72 |= 0;..st|ream.var|
|00001fa0| 69 61 74 69 6f 6e 43 6f | 75 6e 74 20 3d 20 73 65 |iationCo|unt = se|
|00001fb0| 6c 65 63 74 41 6c 6c 56 | 61 72 69 61 74 69 6f 6e |lectAllV|ariation|
|00001fc0| 73 3b 0d 09 73 74 72 65 | 61 6d 2e 76 61 72 69 61 |s;..stre|am.varia|
|00001fd0| 74 69 6f 6e 73 20 3d 20 | 6e 69 6c 3b 0d 09 73 74 |tions = |nil;..st|
|00001fe0| 72 65 61 6d 2e 69 6e 66 | 6f 2e 66 6f 6e 74 2e 65 |ream.inf|o.font.e|
|00001ff0| 6e 63 6f 64 69 6e 67 20 | 3d 20 65 6e 63 6f 64 69 |ncoding |= encodi|
|00002000| 6e 67 3b 0d 09 73 74 72 | 65 61 6d 2e 69 6e 66 6f |ng;..str|eam.info|
|00002010| 2e 66 6f 6e 74 2e 67 6c | 79 70 68 42 69 74 73 20 |.font.gl|yphBits |
|00002020| 3d 20 6e 69 6c 3b 0d 09 | 0d 09 47 65 74 50 6f 73 |= nil;..|..GetPos|
|00002030| 74 53 63 72 69 70 74 46 | 6f 6e 74 4e 61 6d 65 28 |tScriptF|ontName(|
|00002040| 66 6f 6e 74 49 44 2c 66 | 6f 6e 74 4e 61 6d 65 29 |fontID,f|ontName)|
|00002050| 3b 0d 0d 09 73 74 72 65 | 61 6d 2e 69 6e 66 6f 2e |;...stre|am.info.|
|00002060| 66 6f 6e 74 2e 6e 61 6d | 65 20 3d 20 28 63 68 61 |font.nam|e = (cha|
|00002070| 72 20 2a 29 66 6f 6e 74 | 4e 61 6d 65 3b 09 2f 2f |r *)font|Name;.//|
|00002080| 20 74 68 69 73 20 73 68 | 6f 75 6c 64 20 4e 4f 54 | this sh|ould NOT|
|00002090| 20 62 65 20 61 20 70 53 | 74 72 69 6e 67 0d 0d 09 | be a pS|tring...|
|000020a0| 2f 2f 20 43 61 6c 6c 20 | 74 68 65 20 73 63 61 6c |// Call |the scal|
|000020b0| 65 72 20 74 6f 20 67 65 | 6e 65 72 61 74 65 20 74 |er to ge|nerate t|
|000020c0| 68 65 20 64 61 74 61 20 | 66 6f 72 20 75 73 2e 0d |he data |for us..|
|000020d0| 09 47 58 46 6c 61 74 74 | 65 6e 46 6f 6e 74 28 66 |.GXFlatt|enFont(f|
|000020e0| 6f 6e 74 49 44 2c 20 26 | 73 74 72 65 61 6d 2c 20 |ontID, &|stream, |
|000020f0| 26 62 6c 6f 63 6b 2e 73 | 70 6f 6f 6c 29 3b 0d 09 |&block.s|pool);..|
|00002100| 20 0d 09 44 69 73 70 6f | 73 65 52 6f 75 74 69 6e | ..Dispo|seRoutin|
|00002110| 65 44 65 73 63 72 69 70 | 74 6f 72 28 62 6c 6f 63 |eDescrip|tor(bloc|
|00002120| 6b 2e 73 70 6f 6f 6c 2e | 73 70 6f 6f 6c 50 72 6f |k.spool.|spoolPro|
|00002130| 63 65 64 75 72 65 29 3b | 0d 09 72 65 74 75 72 6e |cedure);|..return|
|00002140| 20 28 48 61 6e 64 6c 65 | 29 20 62 6c 6f 63 6b 2e | (Handle|) block.|
|00002150| 64 61 74 61 3b 0d 7d 0d | 0d 0d 2f 2a 2a 2a 2a 2a |data;.}.|../*****|
|00002160| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002190| 2a 2a 0d 09 46 75 6e 63 | 74 69 6f 6e 3a 20 4d 61 |**..Func|tion: Ma|
|000021a0| 6b 65 4d 61 63 38 42 69 | 74 45 6e 63 6f 64 69 6e |keMac8Bi|tEncodin|
|000021b0| 67 3a 0d 09 0d 09 46 75 | 6e 63 74 69 6f 6e 20 73 |g:....Fu|nction s|
|000021c0| 65 74 73 20 75 70 20 61 | 6e 20 65 6e 63 6f 64 69 |ets up a|n encodi|
|000021d0| 6e 67 20 76 65 63 74 6f | 72 20 66 6f 72 20 74 68 |ng vecto|r for th|
|000021e0| 65 20 73 74 61 6e 64 61 | 72 64 0d 09 4d 61 63 20 |e standa|rd..Mac |
|000021f0| 38 20 62 69 74 20 65 6e | 63 6f 64 69 6e 67 20 66 |8 bit en|coding f|
|00002200| 6f 72 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 61 |or the c|urrent a|
|00002210| 63 74 69 76 65 20 73 63 | 72 69 70 74 20 73 79 73 |ctive sc|ript sys|
|00002220| 74 65 6d 2e 0d 09 0d 09 | 74 68 65 46 6f 6e 74 3a |tem.....|theFont:|
|00002230| 09 74 68 65 20 66 6f 6e | 74 20 74 6f 20 6d 61 6b |.the fon|t to mak|
|00002240| 65 20 65 6e 63 6f 64 69 | 6e 67 20 66 6f 72 2e 0d |e encodi|ng for..|
|00002250| 09 65 6e 63 6f 64 69 6e | 67 3a 09 61 72 72 61 79 |.encodin|g:.array|
|00002260| 20 6f 66 20 32 35 36 20 | 73 68 6f 72 74 73 2c 20 | of 256 |shorts, |
|00002270| 65 6e 63 6f 64 69 6e 67 | 20 77 69 6c 6c 20 62 65 |encoding| will be|
|00002280| 20 72 65 74 75 72 6e 65 | 64 0d 09 09 09 09 69 6e | returne|d.....in|
|00002290| 20 68 65 72 65 2e 0d 09 | 72 65 74 75 72 6e 73 3a | here...|returns:|
|000022a0| 09 54 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 62 |.The num|ber of b|
|000022b0| 79 74 65 73 20 65 6e 63 | 6f 64 65 64 2e 20 28 73 |ytes enc|oded. (s|
|000022c0| 68 6f 75 6c 64 20 61 6c | 77 61 79 73 20 62 65 20 |hould al|ways be |
|000022d0| 32 35 36 29 0d 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |256).***|********|
|000022e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000022f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002300| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0d 73 |********|*****/.s|
|00002310| 74 61 74 69 63 20 6c 6f | 6e 67 20 4d 61 6b 65 4d |tatic lo|ng MakeM|
|00002320| 61 63 38 42 69 74 45 6e | 63 6f 64 69 6e 67 28 67 |ac8BitEn|coding(g|
|00002330| 78 46 6f 6e 74 20 74 68 | 65 46 6f 6e 74 2c 20 75 |xFont th|eFont, u|
|00002340| 6e 73 69 67 6e 65 64 20 | 73 68 6f 72 74 20 65 6e |nsigned |short en|
|00002350| 63 6f 64 69 6e 67 5b 5d | 29 0d 7b 0d 09 67 78 46 |coding[]|).{..gxF|
|00002360| 6f 6e 74 53 63 72 69 70 | 74 09 74 68 65 53 63 72 |ontScrip|t.theScr|
|00002370| 69 70 74 3b 0d 09 6c 6f | 6e 67 09 09 09 69 6e 64 |ipt;..lo|ng...ind|
|00002380| 65 78 3b 0d 09 75 6e 73 | 69 67 6e 65 64 20 63 68 |ex;..uns|igned ch|
|00002390| 61 72 09 74 68 65 42 79 | 74 65 73 5b 32 35 36 5d |ar.theBy|tes[256]|
|000023a0| 3b 0d 09 6c 6f 6e 67 09 | 09 09 6c 65 6e 67 74 68 |;..long.|..length|
|000023b0| 3b 0d 09 73 68 6f 72 74 | 09 09 09 69 3b 0d 0d 09 |;..short|...i;...|
|000023c0| 74 68 65 53 63 72 69 70 | 74 20 3d 20 28 67 78 46 |theScrip|t = (gxF|
|000023d0| 6f 6e 74 53 63 72 69 70 | 74 29 47 65 74 45 6e 76 |ontScrip|t)GetEnv|
|000023e0| 69 72 6f 6e 73 28 73 6d | 53 79 73 53 63 72 69 70 |irons(sm|SysScrip|
|000023f0| 74 29 20 2b 20 31 3b 09 | 2f 2f 20 51 75 69 63 6b |t) + 1;.|// Quick|
|00002400| 64 72 61 77 20 47 58 20 | 73 63 72 69 70 74 73 20 |draw GX |scripts |
|00002410| 61 72 65 20 31 2b 73 63 | 72 69 70 74 6d 67 72 20 |are 1+sc|riptmgr |
|00002420| 73 63 72 69 70 74 73 2e | 0d 0d 09 2f 2f 20 74 72 |scripts.|...// tr|
|00002430| 79 20 73 79 73 74 65 6d | 20 73 63 72 69 70 74 20 |y system| script |
|00002440| 66 69 72 73 74 0d 09 69 | 6e 64 65 78 20 3d 20 47 |first..i|ndex = G|
|00002450| 58 46 69 6e 64 46 6f 6e | 74 45 6e 63 6f 64 69 6e |XFindFon|tEncodin|
|00002460| 67 28 74 68 65 46 6f 6e | 74 2c 20 67 78 4d 61 63 |g(theFon|t, gxMac|
|00002470| 69 6e 74 6f 73 68 50 6c | 61 74 66 6f 72 6d 2c 20 |intoshPl|atform, |
|00002480| 74 68 65 53 63 72 69 70 | 74 2c 20 67 78 4e 6f 4c |theScrip|t, gxNoL|
|00002490| 61 6e 67 75 61 67 65 29 | 3b 0d 09 69 66 28 21 69 |anguage)|;..if(!i|
|000024a0| 6e 64 65 78 29 20 7b 0d | 09 09 2f 2f 20 77 65 6c |ndex) {.|..// wel|
|000024b0| 6c 2c 20 74 68 61 74 20 | 64 69 64 6e 27 74 20 77 |l, that |didn't w|
|000024c0| 6f 72 6b 2e 20 54 72 79 | 20 72 6f 6d 61 6e 0d 09 |ork. Try| roman..|
|000024d0| 09 69 6e 64 65 78 20 3d | 20 47 58 46 69 6e 64 46 |.index =| GXFindF|
|000024e0| 6f 6e 74 45 6e 63 6f 64 | 69 6e 67 28 74 68 65 46 |ontEncod|ing(theF|
|000024f0| 6f 6e 74 2c 20 67 78 4d | 61 63 69 6e 74 6f 73 68 |ont, gxM|acintosh|
|00002500| 50 6c 61 74 66 6f 72 6d | 2c 20 67 78 52 6f 6d 61 |Platform|, gxRoma|
|00002510| 6e 53 63 72 69 70 74 2c | 20 67 78 4e 6f 4c 61 6e |nScript,| gxNoLan|
|00002520| 67 75 61 67 65 29 3b 0d | 09 7d 0d 0d 09 2f 2a 2a |guage);.|.}.../**|
|00002530| 20 4d 61 6b 65 20 74 68 | 65 20 6d 61 63 20 63 68 | Make th|e mac ch|
|00002540| 61 72 61 63 74 65 72 20 | 73 65 74 20 2a 2a 2f 09 |aracter |set **/.|
|00002550| 09 0d 09 66 6f 72 20 28 | 69 20 3d 20 30 3b 20 69 |...for (|i = 0; i|
|00002560| 20 3c 20 32 35 36 3b 20 | 2b 2b 69 29 0d 09 09 74 | < 256; |++i)...t|
|00002570| 68 65 42 79 74 65 73 5b | 69 5d 20 3d 20 69 3b 0d |heBytes[|i] = i;.|
|00002580| 0d 09 2f 2a 2a 20 43 6f | 6e 76 65 72 74 20 69 74 |../** Co|nvert it|
|00002590| 20 74 6f 20 67 6c 79 70 | 68 20 63 6f 64 65 73 20 | to glyp|h codes |
|000025a0| 2a 2a 2f 0d 09 6c 65 6e | 67 74 68 20 3d 20 47 58 |**/..len|gth = GX|
|000025b0| 41 70 70 6c 79 46 6f 6e | 74 45 6e 63 6f 64 69 6e |ApplyFon|tEncodin|
|000025c0| 67 28 74 68 65 46 6f 6e | 74 2c 20 69 6e 64 65 78 |g(theFon|t, index|
|000025d0| 2c 20 6e 69 6c 2c 20 74 | 68 65 42 79 74 65 73 2c |, nil, t|heBytes,|
|000025e0| 20 32 35 36 2c 20 65 6e | 63 6f 64 69 6e 67 2c 20 | 256, en|coding, |
|000025f0| 6e 69 6c 29 3b 0d 0d 09 | 72 65 74 75 72 6e 28 6c |nil);...|return(l|
|00002600| 65 6e 67 74 68 29 3b 0d | 7d 0d 0d 73 74 61 74 69 |ength);.|}..stati|
|00002610| 63 20 67 78 46 6f 6e 74 | 20 43 6f 6e 76 65 72 74 |c gxFont| Convert|
|00002620| 51 44 46 6f 6e 74 54 6f | 47 58 46 6f 6e 74 28 73 |QDFontTo|GXFont(s|
|00002630| 68 6f 72 74 20 71 64 46 | 6f 6e 74 2c 20 73 68 6f |hort qdF|ont, sho|
|00002640| 72 74 20 71 64 53 74 79 | 6c 65 29 0d 7b 0d 09 67 |rt qdSty|le).{..g|
|00002650| 78 46 6f 6e 74 09 09 74 | 68 65 46 6f 6e 74 3b 0d |xFont..t|heFont;.|
|00002660| 09 67 78 53 74 79 6c 65 | 20 74 68 65 53 74 79 6c |.gxStyle| theStyl|
|00002670| 65 20 3d 20 47 58 4e 65 | 77 53 74 79 6c 65 28 29 |e = GXNe|wStyle()|
|00002680| 3b 0d 09 47 58 43 6f 6e | 76 65 72 74 51 44 46 6f |;..GXCon|vertQDFo|
|00002690| 6e 74 28 74 68 65 53 74 | 79 6c 65 2c 20 71 64 46 |nt(theSt|yle, qdF|
|000026a0| 6f 6e 74 2c 20 71 64 53 | 74 79 6c 65 29 3b 0d 09 |ont, qdS|tyle);..|
|000026b0| 74 68 65 46 6f 6e 74 20 | 3d 20 47 58 47 65 74 53 |theFont |= GXGetS|
|000026c0| 74 79 6c 65 46 6f 6e 74 | 28 74 68 65 53 74 79 6c |tyleFont|(theStyl|
|000026d0| 65 29 3b 0d 09 47 58 44 | 69 73 70 6f 73 65 53 74 |e);..GXD|isposeSt|
|000026e0| 79 6c 65 28 74 68 65 53 | 74 79 6c 65 29 3b 0d 09 |yle(theS|tyle);..|
|000026f0| 72 65 74 75 72 6e 28 74 | 68 65 46 6f 6e 74 29 3b |return(t|heFont);|
|00002700| 0d 7d 0d 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |.}..stat|ic void |
|00002710| 44 75 6d 70 48 61 6e 64 | 6c 65 54 6f 46 69 6c 65 |DumpHand|leToFile|
|00002720| 28 50 69 63 48 61 6e 64 | 6c 65 20 64 61 74 61 29 |(PicHand|le data)|
|00002730| 0d 7b 0d 09 53 74 61 6e | 64 61 72 64 46 69 6c 65 |.{..Stan|dardFile|
|00002740| 52 65 70 6c 79 09 72 65 | 70 6c 79 3b 0d 09 53 74 |Reply.re|ply;..St|
|00002750| 72 32 35 35 09 64 65 66 | 61 75 6c 74 4e 61 6d 65 |r255.def|aultName|
|00002760| 20 3d 20 22 5c 70 46 6f | 6e 74 44 75 6d 70 22 3b | = "\pFo|ntDump";|
|00002770| 0d 09 53 74 72 32 35 35 | 09 70 72 6f 6d 70 74 20 |..Str255|.prompt |
|00002780| 3d 20 22 5c 70 43 72 65 | 61 74 65 20 66 6f 6e 74 |= "\pCre|ate font|
|00002790| 20 66 69 6c 65 22 3b 0d | 09 73 68 6f 72 74 09 66 | file";.|.short.f|
|000027a0| 72 65 66 3b 0d 0d 09 69 | 66 20 28 21 64 61 74 61 |ref;...i|f (!data|
|000027b0| 29 20 72 65 74 75 72 6e | 3b 0d 0d 09 53 74 61 6e |) return|;...Stan|
|000027c0| 64 61 72 64 50 75 74 46 | 69 6c 65 28 70 72 6f 6d |dardPutF|ile(prom|
|000027d0| 70 74 2c 64 65 66 61 75 | 6c 74 4e 61 6d 65 2c 26 |pt,defau|ltName,&|
|000027e0| 72 65 70 6c 79 29 3b 0d | 09 69 66 20 28 72 65 70 |reply);.|.if (rep|
|000027f0| 6c 79 2e 73 66 47 6f 6f | 64 29 20 7b 0d 09 09 69 |ly.sfGoo|d) {...i|
|00002800| 66 20 28 72 65 70 6c 79 | 2e 73 66 52 65 70 6c 61 |f (reply|.sfRepla|
|00002810| 63 69 6e 67 29 20 46 53 | 70 44 65 6c 65 74 65 28 |cing) FS|pDelete(|
|00002820| 26 28 72 65 70 6c 79 2e | 73 66 46 69 6c 65 29 29 |&(reply.|sfFile))|
|00002830| 3b 0d 09 09 46 53 70 43 | 72 65 61 74 65 52 65 73 |;...FSpC|reateRes|
|00002840| 46 69 6c 65 28 26 28 72 | 65 70 6c 79 2e 73 66 46 |File(&(r|eply.sfF|
|00002850| 69 6c 65 29 2c 27 52 53 | 45 44 27 2c 27 72 73 72 |ile),'RS|ED','rsr|
|00002860| 63 27 2c 72 65 70 6c 79 | 2e 73 66 53 63 72 69 70 |c',reply|.sfScrip|
|00002870| 74 29 3b 0d 09 09 66 72 | 65 66 20 3d 20 46 53 70 |t);...fr|ef = FSp|
|00002880| 4f 70 65 6e 52 65 73 46 | 69 6c 65 28 26 28 72 65 |OpenResF|ile(&(re|
|00002890| 70 6c 79 2e 73 66 46 69 | 6c 65 29 2c 66 73 52 64 |ply.sfFi|le),fsRd|
|000028a0| 57 72 50 65 72 6d 29 3b | 0d 09 09 41 64 64 52 65 |WrPerm);|...AddRe|
|000028b0| 73 6f 75 72 63 65 28 28 | 48 61 6e 64 6c 65 29 64 |source((|Handle)d|
|000028c0| 61 74 61 2c 27 50 49 43 | 54 27 2c 31 2c 22 5c 70 |ata,'PIC|T',1,"\p|
|000028d0| 74 65 73 74 20 70 69 63 | 74 75 72 65 22 29 3b 0d |test pic|ture");.|
|000028e0| 09 09 55 70 64 61 74 65 | 52 65 73 46 69 6c 65 28 |..Update|ResFile(|
|000028f0| 66 72 65 66 29 3b 0d 09 | 09 43 6c 6f 73 65 52 65 |fref);..|.CloseRe|
|00002900| 73 46 69 6c 65 28 66 72 | 65 66 29 3b 0d 09 7d 0d |sFile(fr|ef);..}.|
|00002910| 7d 0d 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 49 |}..stati|c void I|
|00002920| 6e 69 74 54 6f 6f 6c 62 | 6f 78 28 76 6f 69 64 29 |nitToolb|ox(void)|
|00002930| 0d 7b 0d 09 48 61 6e 64 | 6c 65 09 09 6d 79 4d 65 |.{..Hand|le..myMe|
|00002940| 6e 75 42 61 72 3b 0d 09 | 4d 65 6e 75 48 61 6e 64 |nuBar;..|MenuHand|
|00002950| 6c 65 09 61 70 70 6c 65 | 4d 65 6e 75 3b 0d 09 0d |le.apple|Menu;...|
|00002960| 09 49 6e 69 74 47 72 61 | 66 28 20 26 71 64 2e 74 |.InitGra|f( &qd.t|
|00002970| 68 65 50 6f 72 74 20 29 | 3b 0d 09 49 6e 69 74 46 |hePort )|;..InitF|
|00002980| 6f 6e 74 73 28 29 3b 0d | 09 46 6c 75 73 68 45 76 |onts();.|.FlushEv|
|00002990| 65 6e 74 73 28 20 65 76 | 65 72 79 45 76 65 6e 74 |ents( ev|eryEvent|
|000029a0| 2c 20 30 20 29 3b 0d 09 | 49 6e 69 74 57 69 6e 64 |, 0 );..|InitWind|
|000029b0| 6f 77 73 28 29 3b 0d 09 | 49 6e 69 74 4d 65 6e 75 |ows();..|InitMenu|
|000029c0| 73 28 29 3b 0d 09 54 45 | 49 6e 69 74 28 29 3b 0d |s();..TE|Init();.|
|000029d0| 09 49 6e 69 74 44 69 61 | 6c 6f 67 73 28 20 6e 69 |.InitDia|logs( ni|
|000029e0| 6c 20 29 3b 0d 09 49 6e | 69 74 43 75 72 73 6f 72 |l );..In|itCursor|
|000029f0| 28 29 3b 0d 0d 09 2f 2f | 20 74 68 69 73 20 6c 69 |();...//| this li|
|00002a00| 74 74 6c 65 20 64 65 6d | 6f 20 64 6f 65 73 6e 27 |ttle dem|o doesn'|
|00002a10| 74 20 75 73 65 20 74 68 | 65 20 6d 65 6e 75 20 62 |t use th|e menu b|
|00002a20| 61 72 2c 20 62 75 74 20 | 68 65 79 0d 09 6d 79 4d |ar, but |hey..myM|
|00002a30| 65 6e 75 42 61 72 20 3d | 20 47 65 74 4e 65 77 4d |enuBar =| GetNewM|
|00002a40| 42 61 72 28 20 31 32 38 | 20 29 3b 0d 09 53 65 74 |Bar( 128| );..Set|
|00002a50| 4d 65 6e 75 42 61 72 28 | 20 6d 79 4d 65 6e 75 42 |MenuBar(| myMenuB|
|00002a60| 61 72 20 29 3b 0d 09 61 | 70 70 6c 65 4d 65 6e 75 |ar );..a|ppleMenu|
|00002a70| 20 3d 20 47 65 74 4d 48 | 61 6e 64 6c 65 28 20 31 | = GetMH|andle( 1|
|00002a80| 32 38 20 29 3b 0d 09 0d | 09 41 64 64 52 65 73 4d |28 );...|.AddResM|
|00002a90| 65 6e 75 28 20 61 70 70 | 6c 65 4d 65 6e 75 2c 20 |enu( app|leMenu, |
|00002aa0| 27 44 52 56 52 27 20 29 | 3b 0d 09 44 72 61 77 4d |'DRVR' )|;..DrawM|
|00002ab0| 65 6e 75 42 61 72 28 29 | 3b 0d 7d 0d 00 00 00 00 |enuBar()|;.}.....|
|00002ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b00| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00002b10| 73 0d 23 64 65 66 69 6e | 65 20 6b 4d 61 73 6b 41 |s.#defin|e kMaskA|
|00002b20| 53 43 49 49 31 09 09 30 | 78 30 30 30 30 30 30 46 |SCII1..0|x000000F|
|00002b30| 0c 46 6f 6e 74 54 6f 50 | 69 63 74 2e 63 50 02 00 |.FontToP|ict.cP..|
|00002b40| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 28 00 00 |..TEXTMP|S ...(..|
|00002b50| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 28 00 00 |..TEXTMP|S ...(..|
|00002b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b70| 00 00 ab 57 9c 5c 00 00 | 2a 3c 00 00 01 c8 45 09 |...W.\..|*<....E.|
|00002b80| 09 09 2f 2f 20 61 73 63 | 69 69 20 66 6f 72 20 61 |..// asc|ii for a|
|00002b90| 20 70 65 72 69 6f 64 0d | 0d 42 6f 6f 6c 65 61 6e | period.|.Boolean|
|00002ba0| 20 43 68 65 63 6b 43 6d | 64 50 65 72 69 6f 64 20 | CheckCm|dPeriod |
|00002bb0| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 70 45 |(EventRe|cord *pE|
|00002bc0| 76 65 6e 74 29 20 7b 0d | 0d 09 42 6f 6f 6c 65 61 |vent) {.|..Boolea|
|00002bd0| 6e 20 72 65 73 75 6c 74 | 3b 0d 09 73 68 6f 72 74 |n result|;..short|
|00002be0| 09 6b 65 79 43 6f 64 65 | 3b 0d 09 6c 6f 6e 67 20 |.keyCode|;..long |
|00002bf0| 76 69 72 74 75 61 6c 4b | 65 79 2c 20 6b 65 79 49 |virtualK|ey, keyI|
|00002c00| 00 00 00 1e 00 3a 00 e4 | 01 f3 03 02 00 3a 00 e4 |.....:..|.....:..|
|00002c10| 01 f3 03 02 00 00 1a bc | 00 00 00 00 00 00 00 00 |........|........|
|00002c20| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00002c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c40| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 3e 00 15 |........|.....>..|
|00002c50| 02 3f 02 c1 00 3e 00 15 | 02 3f 02 c1 ac f7 4b d9 |.?...>..|.?....K.|
|00002c60| 00 00 0a ac 00 00 0a ac | 00 00 09 3a 01 00 00 00 |........|...:....|
|00002c70| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00002c80| 00 76 00 00 00 52 01 34 | 8b d8 28 c4 00 00 00 1c |.v...R.4|..(.....|
|00002c90| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|00002ca0| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|00002cb0| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|00002cc0| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+